package de.baumann.browser.activitys.hash

import android.content.Context
import android.content.Intent
import android.os.Bundle
import android.view.Menu
import android.view.MenuItem
import de.baumann.browser.R
import de.baumann.browser.activitys.H5Activity
import de.baumann.browser.adapter.PagerAdapter
import de.baumann.browser.base.BaseOdinActivity
import de.baumann.browser.base.BasePresenter
import de.baumann.browser.fragments.StealFragment
import de.baumann.browser.iview.IBaseView
import kotlinx.android.synthetic.main.activity_steal_pool.*
import kotlinx.android.synthetic.main.include_tool_bar.*

@Deprecated("5.0.0版本删除")
class StealPoolActivity : BaseOdinActivity<IBaseView, BasePresenter<IBaseView>>() {


    companion object {
        fun startStealPoolActivity(context: Context) {
            context.startActivity(Intent(context, StealPoolActivity::class.java))
        }
    }

    override fun getLayout(): Int {
        return R.layout.activity_steal_pool
    }

    override fun getTitleText(): String {
        return "采矿"
    }

    override fun initView() {
        initToolbar(commToolBar, commTitle)
    }

    override fun initData() {
        val stealFragment = StealFragment()
        val bundle = Bundle()
        bundle.putBoolean("steal", true)
        stealFragment.arguments = bundle
        val oftenFragment = StealFragment()
        val bundleoften = Bundle()
        bundleoften.putBoolean("steal", false)
        oftenFragment.arguments = bundleoften
        val pagerAdapter = PagerAdapter(supportFragmentManager, arrayListOf(stealFragment, oftenFragment), arrayOf("可收取", "收取我的"))
        stealViewPager.adapter = pagerAdapter
        stealTab.setupWithViewPager(stealViewPager)
    }

    override fun createPresenter(): BasePresenter<IBaseView>? {
        return null
    }

    override fun createView(): IBaseView? {
        return null
    }
}
